<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<?php if(!$form->isNew()):?>
<ul class="tabs">
         <li><a href="#tab1">Datos del Cliente</a></li>
         <li><a href="#tab2">Trabajos a Realizar</a></li>
         <!--<li><a href="#tab3">Presupuesto</a></li>-->
</ul>
<div class="sf_admin_form">
  <?php echo form_tag_for($form, '@ordenesservicio') ?>
    <?php echo $form->renderHiddenFields() ?>

    <?php if ($form->hasGlobalErrors()): ?>
      <?php echo $form->renderGlobalErrors() ?>
    <?php endif; ?>
    <div class="tab_container">
    <?php $e=1;foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?>
       <div id ="tab<?php echo $e++?>"   class="tab_content">
            <?php include_partial('ingresoReparaciones/form_fieldset', array('ordenesservicio' => $ordenesservicio, 'form' => $form, 'fields' => $fields, 'fieldset' => $fieldset)) ?>
      </div>
    <?php endforeach; ?>
    </div>
    <?php include_partial('ingresoReparaciones/form_actions', array('ordenesservicio' => $ordenesservicio, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
  </form>
</div>
<?php else:?>
   <div class="sf_admin_form">
  <?php echo form_tag_for($form, '@ordenesservicio') ?>
    <?php echo $form->renderHiddenFields() ?>

    <?php if ($form->hasGlobalErrors()): ?>
      <?php echo $form->renderGlobalErrors() ?>
    <?php endif; ?>
    
    <?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?>
            <?php include_partial('ingresoReparaciones/form_fieldset', array('ordenesservicio' => $ordenesservicio, 'form' => $form, 'fields' => $fields, 'fieldset' => $fieldset)) ?>
    <?php endforeach; ?>
 
    <?php include_partial('ingresoReparaciones/form_actions', array('ordenesservicio' => $ordenesservicio, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
  </form>
</div>
<?php endif; ?>